package com.jltx.xq.relaxnewspro.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

/**
 * Created by bo on 2017/4/9.
 */

public abstract class PagerAdapter extends FragmentStatePagerAdapter {
    private String[]titles;

    public PagerAdapter(FragmentManager fm, String[] titles) {
        super(fm);
        this.titles = titles;
    }

    public int getCount(){
        return titles.length;
    }

    public CharSequence getPageTitle(int position){
        return titles[position];
    }
}
